import request from '@/utils/request'

// 查询评估记录列表
export function listRecord(query) {
  return request({
    url: '/asset/record/list',
    method: 'get',
    params: query
  })
}

// 查询评估记录详细
export function getRecord(id) {
  return request({
    url: '/asset/record/' + id,
    method: 'get'
  })
}

// 新增评估记录
export function addRecord(data) {
  return request({
    url: '/asset/record',
    method: 'post',
    data: data
  })
}

// 修改评估记录
export function updateRecord(data) {
  return request({
    url: '/asset/record',
    method: 'put',
    data: data
  })
}

// 删除评估记录
export function delRecord(id) {
  return request({
    url: '/asset/record/' + id,
    method: 'delete'
  })
}

// 查询狮桥车辆类型
export function getSqCarType() {
  return request({
    url: '/asset/record/sq/carType',
    method: 'get'
  })
}

// 查询模板详细数据
export function getSqTempDetail(val) {
  return request({
    url: '/asset/record/sq/temp/' + val,
    method: 'get'
  })
}

//刷新狮桥评估
export function getSQDetail(id) {
  return request({
    url: '/asset/record/sq/detail/' + id,
    method: 'get'
  })
}

export function getQiniuToken() {
  return request({
    url: '/asset/record/qiniu/token',
    method: 'get'
  })
}
